<!DOCTYPE html>
<html>
  <head>
    <title>testFrame</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <script type="text/javascript">
      function test()
      {
        var oTr = document.getElementById("keyElement");
        //待补完（つづく）
        oTr.parentNode.parentNode.setAttribute("style", "border:1px solid blue");
      }
    </script>
  </head>
  <body>
    <table>
      <tr>
        <td>账号</td>
        <td>昵称</td>
        <td>最喜欢的人</td>
        <td>余额</td>
      </tr>
      <tr>
        <td>001</td>
        <td>kashiwazaki sena</td>
        <td>Sakuras</td>
        <td>100</td>
      </tr>
      <tr>
        <td>002</td>
        <td>mikatsuki yozora</td>
        <td>Sakuras</td>
        <td>200</td>
      </tr>
      <tr>
        <td>003</td>
        <td>hasegawa kobato</td>
        <td>Sakuras</td>
        <td>50</td>
      </tr>
      <tr id="keyElement">
        <td>004</td>
        <td>kisaragi Sakuras</td>
        <td>yozora</td>
        <td>80</td>
      </tr>
    </table>

    <input type="button" value="点我执行js" onclick="test();" />
  </body>
</html>
